const routes = [
    //整个页面切换属于一级路由
    {
      path: '/home',
      name: 'home',
      meta:{title:'首页'},
      //普通加载方式
      component: () => import('../views/Btn.vue'),
      children:[
        {
            path:'/home/index',
            name:'index',
            meta:{title:'首页'},
            component:()=>import('../views/Btn/Elm.vue')
        },
        {
            path:'/home/bbt',
            name:'bbt',
            meta:{title:'爆爆团'},
            component:()=>import('../views/Btn/Bbtuan.vue')
        },
        {
            path:'/home/order',
            name:'order',
            meta:{title:'订单'},
            component:()=>import('../views/Btn/Order.vue')
        },
        {
            path:'/home/mine',
            name:'mine',
            meta:{title:'我的'},
            component:()=>import('../views/Btn/Mine.vue')
        },
        {
            path:'/',
            redirect:'/home/index'
        },
        {
          path:'*',
          component:()=>import('../views/Notfound.vue')
        }
      ]
    },
    {
      path:'/login',
      name:'login',
      meta:{title:'登录'},
      component:()=>import('../views/Login.vue')
    },
    {
      path:'/register',
      name:'/register',
      meta:{title:'注册'},
      component:()=>import('../views/Register.vue')
    },
    {
      path:'/xiangqin/:id',
      home:'/xiangqin',
      component:()=>import('../views/Xiangqin.vue')
    },
    {
      path:'/',
      redirect:'/home'
    },
    {
      path:'*',
      component:()=>import('../views/Notfound.vue')
    }
  ]
  export default routes